package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum TransferStatusEnum {
    RETURNED("已退回", -1),
    TRANSFERRING("划转中", 0),
    RECEIVED("已接收", 1);

    public final String name;
    public final int value;

    TransferStatusEnum(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (TransferStatusEnum transferStatusEnum : TransferStatusEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", transferStatusEnum.getName());
            map.put("val", transferStatusEnum);
            list.add(map);
        }
        return list;
    }
}
